#!/usr/bin/python
# -*- coding: utf-8 -*-
"""unit test
"""

import os
os.environ['DJANGO_SETTINGS_MODULE'] = "safecenter.settings"

try:
    import django
except:
    from safecenter.init_modules import init
    init()
    
import unittest
from dboperator import *

class DBOperatorTest(unittest.TestCase):
    
    def setUp(self):
        "Hook method for setting up the test fixture before exercising it."
        self.db = DBOperator.get_instance()
    
    def test_singleton(self):
        self.assertEqual(id(self.db), id(DBOperator.get_instance()))

if __name__ == '__main__':
    unittest.main()